Packets in a bitstream are often delineated by the appearance therein of a particular data value, e.g., a particular 8 bit wide (byte or octet) data pattern, which may be termed the "synchronization pattern". When the synchronization pattern is 8 bits in length, it is often referred to as a synchronization byte. When explicit framing signals are not received along with the bitstream, the equipment receiving the bitstream can use the synchronization pattern to identify the start of a packet. Doing so, however, is complicated when the particular data value employed as the synchronization pattern can appear elsewhere within the bits that make up the rest of a packet. Such an appearance may occur a) when the value of the synchronization pattern is not reserved solely for identifying the start of a packet, b) when the bitstream does not have any predefined bit group, e.g., byte, alignment, or c) when errors occur in the bitstream.
For example, according to the so-called "motion pictures expert group-2" (MPEG-2) international standard ISO/IEC 13818-1, the data value used for the synchronization pattern, referred to therein as the "sync-byte", is 0.times.47. Each MPEG-2 transport bitstream packet has a length of 188 bytes, the first of which is the sync-byte. Thus, a sync-byte should appear in the bitstream every 188 bytes.
According to one prior art technique, each 8 bit pattern of an MPEG-2 bitstream is tested to determine if it is a sync-byte. The testing is performed using an eight bit window that is slid one bit each time the test is performed, until a sync-byte is found. When a tested group of eight bits matches the sync-byte, the next 187 eight bit groups are counted as they pass, but they are not tested. Then, the 189th byte is tested to determine if it is a sync-byte. If so, it is determined that the preceding 188 bytes, i.e., the first found sync-byte and the counted 187 eight bit groups, were likely to have been a packet. The process is then repeated several times to minimize the chance that the apparent detection of sync-bytes spaced apart by the length of one packet is the result of a value equal to that of the sync-byte randomly appearing in the bitstream at the correct interval and not actual packet delineating sync-bytes. Note that the appearance in the bitstream of a value equal to that of the sync-byte at a position where a sync byte should not appear is referred to as "sync-byte emulation". If ever the 189th 8 bit pattern does not conform to the sync-byte, the process is restarted.
Disadvantageously, in applications where there is sync-byte emulation, this technique may be slow to determine that a packet has been received. Also, the delineation process causes the loss of the data of all of the packets used to determine the packet delineation.